<?php

session_start();
if(!isset($_SESSION['id']) || empty($_SESSION['id'])) {
  header('location:form.php');
  exit;
}

echo "<h2>Welcome, $_SESSION[name]</h2>
     <p>Hope you are doing well today..:)
     <a href=\"logout.php\">Logout</a>
     </p>
     <h4>Your Session is </h4>";
print_r($_SESSION);

